package gameStream.state
{
	import gameStream.display.BallPosition;
	
	import org.gof.state.BaseGameLogic;
	import org.gof.state.IGOInputState;
	import org.gof.state.IGOState;
	import org.gof.state.IGOStatePosition;
	import org.gof.stream.BaseGameObject;
	
	public class BallGameLogic extends BaseGameLogic
	{
		
		private var state:BallGameState;

		
		public function BallGameLogic(state:BallGameState)
		{
			super();
			this.state = state;
	
		}
		
		public override function incrementState(stepSize:Number=1):void
		{
			//trace ("BallStateManager.incrementState");
			var length: uint = (state.gameObjectList as BallGameObjectList).length;
			for (var cntx:uint = 0; cntx<length; cntx++)
			{
				var go:BaseGameObject = (state.gameObjectList as BallGameObjectList).getGOat(cntx) as BaseGameObject;
				var oldPos:BallPosition =  go.position as BallPosition;
				oldPos.move(2,2);
			
			}
		}
		
		
	}
}